<!-- 设置群管理员 -->
<template>
  <div id="GroupAdministrator">
    <!-- 头部 -->
    <Head title="设置群管理员" BackType1="true" :NoticeType4="!show" :NoticeType3="show" v-on:EditorClick="RemoveMembers" v-on:SuccessClick="Success"></Head>
    <!-- 主体 -->
    <div id="Main">
      <span class="PartitionText">群主</span>
      <div class="GroupManager">
        <div>
          <img src="../assets/img/NoPic.png" alt>
          <span class="name">群主</span>
        </div>
        <span class="my">我</span>
      </div>
      <span class="PartitionText">群管理员</span>
      <ul class="GroupAdminBox">
        <li v-for="item in admiList" class="GroupAdmin">
          <div>
            <img :src="item.img" alt>
            <span class="name">{{item.name}}</span>
          </div>
          <van-button round type="danger" v-show="show" @click="del(item.id)">移除</van-button>
        </li>
      </ul>
    </div>
    <!-- 底部按钮 -->
    <van-button type="info" class="submitBtn" to="/addmembers">添加管理员</van-button>
  </div>
</template>

<script>
import Head from "../components/Head.vue";
import Img from "../assets/img/NoPic.png";
import { Button } from "vant";
export default {
  data() {
    return {
      show:false,
      admiList: [
        {
          img: Img,
          name: "b比利比里亚",
          id:1
        },
        {
          img: Img,
          name: "b比里亚",
          id:2
        }
      ]
    };
  },
  components: {
    Head,
    Img,
    [Button.name]: Button
  },
  methods: {
    RemoveMembers(){
      this.show = true;
    },
    Success(){
      this.show = false;
    },
    del(id) {
      this.admiList = this.admiList.filter(val => {
        return val.id == id ;
      });
    }
  },
  created() {}
};
</script>

<style lang="less" scoped>
#GroupAdministrator {
  font-size: 28px;
  #Main {
    position: fixed;
    top: 88px;
    overflow: scroll;
    width: 100%;
    .PartitionText {
      display: block;
      padding-left: 30px;
      padding-top: 19px;
      padding-bottom: 18px;
      font-size: 24px;
      color: #888888;
    }
    .GroupManager {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 15px;
      padding-bottom: 15px;
      padding-left: 30px;
      padding-right: 30px;
      background-color: #ffffff;
      border-bottom: 1px solid #e5e5e5;
      div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        img {
          display: block;
          width: 80px;
          height: 80px;
        }
        .name {
          font-size: 33px;
          color: #323232;
          padding-left: 22px;
        }
      }
      .my {
        font-size: 32px;
        color: #5b7ef9;
      }
    }
    .GroupAdminBox {
      li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 15px;
        padding-bottom: 15px;
        padding-left: 30px;
        padding-right: 30px;
        background-color: #ffffff;
        border-bottom: 1px solid #e5e5e5;
        div {
          display: flex;
          justify-content: flex-start;
          align-items: center;
          img {
            display: block;
            width: 80px;
            height: 80px;
          }
          .name {
            font-size: 33px;
            color: #323232;
            padding-left: 22px;
          }
        }
        .van-button--danger {
          width: 120px;
          height: 60px;
          line-height: 60px;
          background: rgba(255, 59, 48, 1);
          border: 1px solid rgba(255, 59, 48, 1);
          border-radius: 6px;
        }
      }
    }
  }
  .submitBtn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 98px;
    color: #5b7ef9;
    font-size: 32px;
    color: #ffffff;
  }
}
</style>
